Skip to content

Extra examples of migrating keyCode modifiers #1125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

skirtles-code
Copy link
Contributor

The original motivation here is trying to explain how to handle punctuation characters. The RFC doesn't seem to acknowledge this problem. event.key exposes printable keys as single-character strings, equal to the printable character. There is no 'kebab-case named' equivalent, you just have to write the character literally in the attribute. In many cases that isn't possible as the character isn't syntactically valid. I'm not aware of any workaround for this, aside from not using the modifier.

I've also changed the existing example. The delete key has special internal handling, so I don't think it's the most suitable choice for an example. page-down illustrates the use of kebab-case. The q example illustrates how the conversion to kebab-case results in letters being matched case-insensitively.

@NataliaTepluhina NataliaTepluhina merged commit afc2a95 into vuejs:master Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants